<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/1/18
  Time: 19:06
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>后台登录首页</title>
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">

</head>
<body>

<div style="margin-top: 120px; width:40%; margin-left: auto;margin-right: auto">
  <p class="text-center" style="font-size: 30px"><strong>后台登录</strong></p>
  <form class="form-horizontal" method="get" action="${pageContext.request.contextPath}/adminServlet">
    <input type="text" hidden="hidden" name="method" value="login">
    <div class="form-group">
      <label for="Name" class="col-sm-2 control-label">用户名</label>
      <div class="col-sm-10">
        <input type="text" class="form-control" required name="loginAdminName" id="Name" placeholder="用户名" style="float: left;width: 60%">
      </div>
    </div>
    <div class="form-group">
      <label for="Name2" class="col-sm-2 control-label">密码</label>
      <div class="col-sm-10">
        <input type="password" class="form-control" required name="loginAdminPwd" id="Name2" placeholder="密码" style="float: left;width: 60%">
      </div>
    </div>
    <div class="form-group">
      <label  class="col-sm-2 control-label">验证码</label>
      <div class="col-sm-10">
        <input type="text" class="form-control" required name="verificationCode" placeholder="验证码" style="float: left;width: 60%">
        <img src="validateCode" onclick="changeCode(this);" alt="这是一个验证码" style="float: left">
      </div>

    </div>

    <div class="form-group">
      <div class="col-sm-offset-2 col-sm-10">
        <input type="submit" class="btn btn-info" value="登录">
        <a  href="${pageContext.request.contextPath}/adminRegister.jsp"><button type="button" class="btn btn-default">注册</button></a>


      </div>
      <br>
      <br>

      <a  href="${pageContext.request.contextPath}/frontindex.jsp"><button type="button" class="btn  btn btn-default btn-sm">前台</button></a>
    </div>
  </form>


</div>
<script src="js/jquery-3.3.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script>
</body>
</html>

<script>
  function changeCode(obj) {
    obj.src="validateCode?time="+new Date().getTime();
  };
</script>
